Release 10.1A: OpenEdge Data Management:
Database Administration
Creating a structure description file
The structure description file is a text file you prepare that defines the database structure. It contains all of the information required by the PROSTRCT CREATE utility to create a database control area and the database extents.
Use a text editor to create the structure description file. The name you give to the structure description file is usually the name of the database you define, with a
.stextension.The structure description file contains one or more lines of text that provide information about each storage area of the database. Each line of text is composed of tokens, which are text strings made up of alphanumeric characters that describe the following characteristics:
The following syntax shows how the 8 tokens are combined to form line in a structure description file:
Note: You can comment a
.stfile and use blank lines. Precede comments with a pound sign (#), colon (:), or asterisk (*).Table 1–1 explains the value of each of the 8 tokens in a structure description file.
Extent pathnames and naming conventions
The PROSTRCT CREATE utility is designed to allow the end user to specify the minimum amount of information necessary to create a database. Only the area type and extent location must be specified. A suggested convention is that you supply an area name for data storage areas (
d). A specific filename or file extension need not be provided. If you specify a pathname, it must represent a standard operating system file. The only pathname restrictions are those that might be imposed by your operating system.The PROSTRCT CREATE utility will generate filename and file extensions for all database files according to the following naming convention:
- The control area (
.db) and the log file (.lg) are placed in the directory specified by the command line dbname parameter.- If a relative pathname is provided, including using common dot (.) notation, the relative pathname will be expanded to an absolute pathname. Relative paths begin in your current working directory.
- For before-image extents, the filename is the database name with a
.bnextension, wherenrepresents the order in which the extents were created, beginning with1.- For after-image extents, the filename is the database name with a
.anextension, wherenrepresents the order in which the extents were created, beginning with1.- For transaction log extents, the filename is the database name with a
.tnextension, wherenrepresents the order in which the extents were created, beginning with1.- For schema area extents, the filename is the database name with a
.dnextension, wherenrepresents the order in which the extents were created and will be used.Note: In a structure description (- For application data area extents, the filename is the database name followed by an underscore and the area number (for example,
customer_7.d1). The area number is a unique identifier that differentiates between different areas. The application data area extent filenames also have a.dnextension, wherenrepresents the order in which the extents were created and will be used..st) file, to specify a pathname that contains spaces (such as\usr1\misc data), precede the pathname with an exclamation point (!) and wrap the pathname in quotation marks (“ “). For example,!”\usr1\misc data”.Rules for creating storage areas and extents
When you are defining storage areas and extents in order to create a new database:
- The minimum information required in a
.stfile is one schema area extent definition statement and one primary recovery (BI) area extent definition statement.- The minimum information needed to specify any extent is the storage area type and extent pathname. For example:
If you do not define a primary recovery extent path in the
.stfile, the PROSTRCT CREATE utility generates an error.- You cannot use any of the reserved storage area names as application data storage area names.
Extent length
You can specify a fixed-length or variable-length extent:
- Fixed-length
When you create a fixed-length extent, its blocks are preallocated and preformatted specifically for the database. If you want the extent to be fixed length, the extent type token of the extent description line is
f. This token must be lowercase. If the extent is fixed length, use the extent size token to indicate its length in kilobytes.The size of the extent, in kilobytes, must be a multiple of (16 *
database-blocksize). If you specify a size that is not a multiple of this, PROSTRCT CREATE displays a warning message and rounds the size up to the next multiple of (16 *database-blocksize). The minimum length for a fixed-length file is 32K, and the maximum length of a file depends on the size of the file system and the physical volume containing the extent.Table 1–2 shows how the extent size changes based on the database block size.
- Variable-length
Typically, you use a variable-length extent as an overflow file when all fixed-length extents have been exhausted. For DB and BI extents, you can define one variable-length extent for each area, and it must be the last extent in the area. There is no limit to the number of variable-length AI extents you can define. While you indicate a variable-length extent by leaving out the extent size in the
Notes: Regardless of whether the extent is fixed- or variable-length, if it is in a data area with clusters its size must be large enough to hold an entire cluster, or PROSTRCT generates and error..stfile entry line, you can also specify the maximum size to which the extent can grow by indicating the “v” extent type and a size in kilobytes. The initial allocation for a variable-length extent is 32K or the size of the cluster (whichever is larger). Calculate the cluster size by multiplying your block size times your blocks per cluster value.Example structure description file
The following example shows a
.stfile namedsports2000.stthat defines a database with:
- One primary recovery area.
- One schema area.
- Three after-image areas each with a fixed-length extent.
- One transaction log area with a fixed-length extent used with two-phase commit.
- Six application data areas each with one fixed- and one variable-length extent. The area names for the six application data areas are: Employee, Inventory, Cust_Data, Cust_Index, Order, and Misc. Note that the Cust_Data, Cust_Index, and Order areas have cluster sizes assigned to them, and are therefore Type II storage areas. The area numbers are not specified. The areas will be numbered sequentially starting at 7. Blocks per cluster is not specified, creating Type I data areas.
Example structure description file for large files
When creating a new database, large file processing is enabled if the
.stfile specifies a fixed-length extent size or a maximum size for a variable-length extent that is greater than 2 GB. Large file processing requires an Enterprise database license. The following example shows the.stfile of a database with large file processing enabled:
For more information on enabling large file processing, see the "PROUTIL ENABLELARGEFILES qualifier" section.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |